<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<div class="page-sidebar navbar-collapse collapse">
	<!-- BEGIN SIDEBAR MENU -->
	<ul class="page-sidebar-menu">
		<li>
			<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
			<div class="sidebar-toggler hidden-phone"></div>
			<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
		</li>
		<li>
			<!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->
			<div class="sider-header"></div>
			<!-- END RESPONSIVE QUICK SEARCH FORM -->
		</li>
		<shiro:hasAnyRoles name="固资管理员,采买人,部门负责人,财务,使用人">
			<li id="A">
				<a href="${ctx }/tixing/shouye.do">
					<i class="fa fa-home"></i>
					<span class="title">待办事项</span>
					<span class="selected"></span>
				</a>
				<ul class="sub-menu">
					<li id="A1">
						<a href="${ctx }/wuzi/caiGouDaiBan.do">采购待办&nbsp;&nbsp;<strong><font color="red"><span id="caiGouDaiBan"></span></font></strong></a>
					</li>
					<li id="A2">
						<a href="${ctx }/wuzi/weiXiuDaiBan.do">维修待办&nbsp;&nbsp;<strong><font color="red"><span id="weiXiuDaiBan"></span></font></strong></a>
					</li>
					<li id="A3">
						<a href="${ctx }/wuzi/yiJiaoDaiBan.do">移交待办&nbsp;&nbsp;<strong><font color="red"><span id="yiJiaoDaiBan"></span></font></strong></a>
					</li>
					<shiro:hasRole name="固资管理员">
					<li id="A4">
						<a href="${ctx }/wuzi/tuiHuiDaiBan.do">退还待办&nbsp;&nbsp;<strong><font color="red"><span id="tuiHuanDaiBan"></span></font></strong></a>
					</li>
					</shiro:hasRole>
					<li id="A5">
						<a href="${ctx }/wuzi/baoFeiDaiBan.do">报废待办&nbsp;&nbsp;<strong><font color="red"><span id="baoFeiDaiBan"></span></font></strong></a>
					</li>
					<li id="A6">
						<a href="${ctx }/wuzi/panDianDaiBan.do">盘点待办&nbsp;&nbsp;<strong><font color="red"><span id="panDianDaiBan"></span></font></strong></a>
					</li>
					<shiro:hasRole name="固资管理员">
					<li id="A7">
						<a href="${ctx }/system/xinYongHu.do">新用户同步&nbsp;&nbsp;<strong><font color="red"><span id="tongBuDaiBan"></span></font></strong></a>
					</li>
					</shiro:hasRole>
				</ul>
			</li>
			<li>
				<a href="javascript:;">
					<i class="fa fa-home"></i>
					<span class="title">发起流程</span>
					<span class="selected"></span>
				</a>
				<ul class="sub-menu">
					<li>
						<a href="${ctx }/wuzi/shenQingCaiGou.do" target="_blank">采购申请</a>
					</li>
					<li>
						<a href="${ctx }/wuzi/myList.do" target="_blank">维修申请</a>
					</li>
					<li>
						<a href="${ctx }/wuzi/myList.do" target="_blank">移交申请</a>
					</li>
					<li>
						<a href="${ctx }/wuzi/myList.do" target="_blank">退还申请</a>
					</li>
					<li>
						<a href="${ctx }/wuzi/myList.do" target="_blank">报废申请</a>
					</li>
				</ul>
			</li>
			<li id="B">
				<a href="${ctx }/tixing/shouye.do">
					<i class="fa fa-home"></i>
					<span class="title">我的流程</span>
					<span class="selected"></span>
				</a>
				<ul class="sub-menu">
					<li id="B1">
						<a href="${ctx }/wuzi/myShenQing.do">采购流程</a>
					</li>
					<li id="B2">
						<a href="${ctx }/wuzi/myWeiXiu.do">维修流程</a>
					</li>
					<li id="B3">
						<a href="${ctx }/wuzi/myYiJiao.do">移交流程</a>
					</li>
					<li id="B4">
						<a href="${ctx }/wuzi/myTuiHui.do">退还流程</a>
					</li>
					<li id="B5">
						<a href="${ctx }/wuzi/myBaoFei.do">报废流程</a>
					</li>				
				</ul>
			</li>
		</shiro:hasAnyRoles>
		<shiro:hasAnyRoles name="固资管理员,采买人,部门负责人,财务">
			<li id="C">
				<a href="${ctx }/tixing/shouye.do">
					<i class="fa fa-home"></i>
					<span class="title">我的经办流程</span>
					<span class="selected"></span>
				</a>
				<ul class="sub-menu">
					<li id="C1">
						<a href="${ctx }/wuzi/myShenQingSP.do">采购流程审批</a>
					</li>
					<li id="C2">
						<a href="${ctx }/wuzi/myWeiXiuSP.do">维修流程审批</a>
					</li>
					<li id="C3">
						<a href="${ctx }/wuzi/myYiJiaoSP.do">移交流程审批</a>
					</li>
					<li id="C4">
						<a href="${ctx }/wuzi/myTuiHuiSP.do">退还流程审批</a>
					</li>
					<li id="C5">
						<a href="${ctx }/wuzi/myBaoFeiSP.do">报废流程审批</a>
					</li>				
				</ul>
			</li>
		</shiro:hasAnyRoles>
		<shiro:hasAnyRoles name="固资管理员">
			<li id="K">
				<a href="">
					<i class="fa fa-home"></i>
					<span class="title">流程管理</span>
					<span class="selected"></span>
				</a>
				<ul class="sub-menu">
					<li id="K1">
						<a href="${ctx }/liucheng/shenQingList.do">采购流程</a>
					</li>
					<li id="K2">
						<a href="${ctx }/liucheng/weiXiuList.do">维修流程</a>
					</li>
					<li id="K3">
						<a href="${ctx }/liucheng/yiJiaoList.do">移交流程</a>
					</li>
					<li id="K6">
						<a href="${ctx }/liucheng/tuiHuanList.do">退还流程</a>
					</li>
					<li id="K4">
						<a href="${ctx }/liucheng/baoFeiList.do">报废流程</a>
					</li>
					<li id="K5">
						<a href="${ctx }/liucheng/panDianList.do">盘点流程</a>
					</li>
					<li id="K7">
						<a href="${ctx }/liucheng/tuiHuoList.do">退货流程</a>
					</li>
					<li id="K8">
						<a href="${ctx }/liucheng/huanHuoList.do">换货流程</a>
					</li>
				</ul>
			</li>
		</shiro:hasAnyRoles>
		<shiro:hasRole name="部门负责人">
		<li id="D">
			<a href="${ctx }/wuzi/buMenList.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">部门物资</span>
				<span class="selected"></span>
			</a>
		</li>
		</shiro:hasRole>
		<shiro:hasAnyRoles name="固资管理员,使用人,财务,部门负责人,采买人">
		<li id="E">
			<a href="${ctx }/wuzi/myList.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">我的物资</span>
				<span class="selected"></span>
			</a>
		</li>
		</shiro:hasAnyRoles>
		<shiro:hasRole name="固资管理员">
		<li id="F">
			<a href="${ctx }/wuzi/ziChanPanDian.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">资产盘点处理</span>
				<span class="selected"></span>
			</a>
		</li>
		<li id="G">
			<a href="${ctx }/wuzi/kuCunWuZi.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">库存物资</span>
				<span class="selected"></span>
			</a>
		</li>
		<li id="H">
			<a href="${ctx }/wuzi/allWuZi.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">物资查询</span>
				<span class="selected"></span>
			</a>
		</li>
		<%--<li id="I">
			<a href="${ctx }/wuzi/ziChanBaoFei.do">
				<i class="fa fa-briefcase"></i>
				<span class="title">资产报废</span>
				<span class="selected"></span>
			</a>
		</li>--%>
		</shiro:hasRole>
		<shiro:hasAnyRoles name="系统管理员">
		<li id="J">
			<a href="javascript:;">
				<i class="fa fa-bookmark-o"></i>
				<span class="title">系统管理</span>
				<span class="selected"></span>
			</a>
			<ul class="sub-menu">
				<li id="J1">
					<a href="${ctx }/system/wuziLB.do">资产类别</a>
				</li>
				<li id="J2">
					<a href="${ctx }/system/depUserSetting.do">部门/用户</a>
				</li>
				<li id="J3">
					<a href="${ctx }/system/systemEmail.do">系统邮箱</a>
				</li>
				<li id="J4">
					<a href="${ctx }/system/ldap.do">LDAP设置</a>
				</li>
				<%-- <li id="J5">
					<a href="${ctx }/system/youJianList.do">邮件模板</a>
				</li> --%>
			</ul>
		</li>

		</shiro:hasAnyRoles>
		<li id="I">
			<a href="http://10.30.40.62:9009/ssologin.do?username=${sessionScope.userinfo.getUserName()}&code=${sessionScope.code}" target="_blank">
				<i class="fa fa-briefcase"></i>
				<span class="title">低值易耗管理系统</span>
				<span class="selected"></span>
			</a>
		</li>
	</ul>
	<!-- END SIDEBAR MENU -->
</div>
<script src="${ctx}/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script>
	jQuery(document).ready(function() {
		getDaiBanShu();
	});

	function getDaiBanShu() {
        $.ajax({
            url:"${ctx}/wuzi/getCaiGouShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#caiGouDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/wuzi/getWeiXiuShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#weiXiuDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/wuzi/getYiJiaoShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#yiJiaoDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/wuzi/getTuiHuiShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#tuiHuanDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/wuzi/getBaoFeiShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#baoFeiDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/wuzi/getPanDianShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#panDianDaiBan').html(data.result);
            }
        });
        $.ajax({
            url:"${ctx}/system/getTongBuShu.do",
            cache:false,
            dataType:"json",
            success:function(data){
                $('#tongBuDaiBan').html(data.result);
            }
        });
    }
</script>